package org.xiaojl.modules.drp.entity;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import org.xiaojl.utils.ToolUtil;
import com.baomidou.mybatisplus.annotations.TableName;
import org.xiaojl.common.base.BaseEntity;

/**
 * <p>
 * 产品类型
 * </p>
 *
 * @author xiaojl
 * @since 2017-09-06
 */
@TableName("drp_product_type")
public class DrpProductType extends BaseEntity<DrpProductType> {

    private static final long serialVersionUID = 1L;

    /**
     * 名称
     */
	private String name;
    /**
     * 上级ID
     */
	private Long pid;
	/**
	 * 是否是叶子节点：0-是，1-不是
	 */
	private Integer isLeaf;
    /**
     * 备注
     */
	private String remark;

	@Override
	public Wrapper<DrpProductType> bindingQueryWrapper() {
		Wrapper<DrpProductType> wrapper = new EntityWrapper<DrpProductType>();
		if(ToolUtil.isNotEmpty(this.name)){
			wrapper.like("name", this.name);
		}
		if(ToolUtil.isNotEmpty(this.remark)){
			wrapper.like("remark", this.remark);
		}
		return wrapper;
	}


	public Integer getIsLeaf() {
		return isLeaf;
	}

	public void setIsLeaf(Integer isLeaf) {
		this.isLeaf = isLeaf;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Long getPid() {
		return pid;
	}

	public void setPid(Long pid) {
		this.pid = pid;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

}
